/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package smartgrid;

import java.util.Random;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author claudio
 */
public class Inicitiator {

    public static void main(String[] args) {
        ContractsManager cm = new ContractsManager();
        FacebookAccountManager fm = new FacebookAccountManager();
        int a = 0;
        Random rand = new Random();
        rand.setSeed(System.nanoTime());
        try {
            for (int i = 0; i < 100; i++) {
                String name = SuppliersBeans.Generator.numberGenerator(5);
                System.out.println(i + " " + name);
                fm.insertFacebookAccount(name, SuppliersBeans.Generator.generateName(), "");
                a = rand.nextInt(3);
                while (a != 1) {
                    System.out.println(a);
                    cm.addContractToFacebookAccount(name, rand.nextInt(2) + 1, SuppliersBeans.Generator.numberGenerator(5), SuppliersBeans.Generator.numberGenerator(5));
                    a = rand.nextInt(3);
                }
            }
        } catch (Exception ex) {
            Logger.getLogger(Inicitiator.class.getName()).log(Level.SEVERE, null, ex);

        }
    }
} 
